<script setup lang="ts">
import dayjs from "dayjs";

const getNowDayOfWeek = () => {
  const day = dayjs().day()
  let weekday
  switch (day) {
    case 0:
      weekday = "星期天"
      break
    case 1:
      weekday = "星期一"
      break
    case 2:
      weekday = "星期二"
      break
    case 3:
      weekday = "星期三"
      break
    case 4:
      weekday = "星期四"
      break
    case 5:
      weekday = "星期五"
      break
    case 6:
      weekday = "星期六"
      break
  }
  return weekday as string
}
const nowDateOfMonth = dayjs().date()
const nowDayOfWeek = getNowDayOfWeek()
</script>
<template>
  <div class="m_container">
    <router-link to="" class="img_container">
      <span class="head">{{ nowDayOfWeek }}</span>
      <span class="bd">{{ nowDateOfMonth }}</span>
    </router-link>
    <router-link to="" class="title">每日歌曲推荐</router-link>
    <p>根据你的口味生成，
      <br>
      每天6:00更新</p>
  </div>
</template>
<style scoped lang="scss">
.m_container {
  padding-top: 20px;
  display: inline-flex;
  flex-direction: column;

  .img_container {
    display: inline-block;
    height: 140px;
    width: 140px;
    overflow: hidden;
    background-image: url("../../assets/images/three.png");

    .head {
      display: inline-block;
      height: 33px;
      width: 142px;
      line-height: 33px;
      color: #fed9d9;
      text-shadow: 0 -1px #962626;
      text-align: center;
    }

    .bd {
      display: inline-block;
      width: 142px;
      height: 107px;
      line-height: 102px;
      text-align: center;
      font-size: 94px;
      font-family: Arial, Helvetica, sans-serif;
      font-weight: bold;
      color: #202020;
      background-position: 0 -150px;
      background-image: url("../../assets/images/three.png");
    }
  }

  .title {
    padding: 5px 0 3px 0;
    font-size: 14px;
  }

  p {
    font-size: 12px;
  }
}
</style>
